import { request } from "@/request";


export async function fetchList(data) {
  const res = await request("/admin/freeTemplate/pagingQuery", {
    method: "POST",
    data,
  });
  return {
    data: res?.data?.list,
    total: res?.data?.total,
    success: true,
  };
}
export async function add(data) {
  return request("/admin/freeTemplate/editing", {
    method: "POST",
    data,
  });
}

export async function update(data) {
  return request("/admin/freeTemplate/editing", {
    method: "POST",
    data,
  });
}
export function fetchInfo(data) {
  return request(`/admin/freeTemplate/get/${data.id}`, {
    method: "POST",
  });
}

export function remove(data) {
  return request(`/admin/freeTemplate/delete?ids=${data.ids}`, {
    method: "POST",
  });
}
